POV-Ray : Newsgroups : povray.advanced-users : Math help needed please. : Re: Math help needed please. Server Time
30 Jul 2024 20:18:54 EDT (-0400)
  Re: Math help needed please.  
From: Margus Ramst
Date: 19 Apr 1999 19:44:27
Message: <371bb1cb.0@news.povray.org>
Andrew Cocker wrote in message <371b934a.0@news.povray.org>...
>
>Err, no, just a sphere scaled into an ellipse rolling along. I realise I
was wrong
>expecting to be able to rotate 180 degrees in 1 unit, and I should now use
3.141..., it's
>the vertical position of the centre of the ellipse that I am still unclear
about..how it
>moves down and then back up whilst keeping in contact with the floor.
Surely this value
>will vary depending on the rotation, not the scale of the sphere. Forget
that I mentioned
>changing the scale mid-anim..if I can get this to work as is, then I'll be
happy.
>


First, remember that the cirumference of an ellipse is not 2*pi*r. An
approximation is 2*pi*sqrt[(a^2+b^2)/2] where a and b are lengths of major
and minor axes.

The other value you want - I haven't got right now. But why not just do
this: use the Superpatch's trace() function; trace a line from the centre
straight down. You can now get the radius for the current angle.

Basically like this:

#declare Ellipse=sphere{0,1 scale <.25,1,.25> rotate z*clock*360}
#declare Rad=trace(Ellipse,0,-y).y;

At least I think this should work.

Margus


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.